#!/bin/bash

FILE="bugzilla.cron.daily bugzilla.cron.tab"

function die ()
{
	echo
	echo "***"
	echo "*** Fatal error: $*"
	echo "***"
	exit 1
}

if [ $1 = "install" ]; then
	cd "${MY_INSTALLDIR}" || die "Cannot find install dir ${MY_INSTALLDIR}"
	sed -e "s|/var/www/bugzilla|${MY_INSTALLDIR}|g" -i ${FILE} || die "sed failed"
else
	echo "done."
fi
